import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import './plugins/element'
import './plugins/vant'
import './plugins/lazyload'
import './plugins/components'

import "tailwindcss/tailwind.css"

// require('./mock/index.js')

Vue.config.productionTip = false
let vm = new Vue({
  router,
  store,
  render: h => h(App),
})
// import { getIpInfo } from './utils/functions'
// console.log({getIpInfo})

import axios from 'axios'
const getIpInfo = async() => new Promise((success,error)=>{
  axios.get('/selectip').then(e=>{
    const [,cip,cid,cname] = /"cip": "(.*)", "cid": "(.*)", "cname": "(.*)"/.exec(e)
    success({cip,cid,cname})
  }).catch(()=>{
    success()
  })
})
// getIpInfo().then(({cip,cid,cname})=>{
//   console.log({cip,cid,cname})
// })

// setTimeout(()=>{
  vm.$mount('#app')
// },500)